package config

import (
	"exchangeapp/global"
	"strconv"

	"github.com/redis/go-redis/v9"
)

func initRedis() {
	redisClient := redis.NewClient(&redis.Options{
		Addr:     AppConfig.Redis.Host + ":" + strconv.FormatUint(uint64(AppConfig.Redis.Port), 10),
		Password: AppConfig.Redis.Password,
		DB:       AppConfig.Redis.DB,
	})

	global.RedisDB = redisClient
}
